<template>
  <!--官网视频 单个视频组件 -->
  <div class="videoitem">
    <div class="item" >
      <div class="img" @click="clickItem(videoInfo)">
        <img v-if="videoInfo.imgUrl" :src="videoInfo.imgUrl" alt="">
        <div v-else class="noimg">暂无封面</div>
        <div class="fixed_tit">
          {{videoInfo.remark}}
        </div>
      </div>
      <div class="item_tit">{{videoInfo.name}}</div>
    </div>
  </div>
</template>
  
  <script>
export default {
  components: {
  },
  props:['videoInfo'],
  data() {
    return {
     
    };
  },
  created() {
  },
  methods: {
    clickItem(item) {
      this.$emit('clickitem',item)
    }
  },
};
</script>
  
<style lang="scss" scoped>
.videoitem {
  .item {
    width: 100%;
    position: relative;
    .img {
      cursor: pointer;
      border-radius: 8px;
      overflow: hidden;
      width: 100%;
      height: 160px;
      img {
        width: 100%;
        height: 100%;
      }
      .noimg {
        width: 100%;
        height: 160px;
        background: #eee;
        color: #999;
        font-size: 22px;
        text-align: center;
        line-height: 100px;
      }
    }
    .item_tit {
      font-size: 18px;
      text-align: center;
      margin-top: 3px;
    }
    .fixed_tit {
      position: absolute;
      text-align: center;
      padding: 0 30px;
      width: 100%;
      height: 55px;
      top: 50%;
      color: #333;
      font-size: 18px;
      line-height: 18px;
      font-weight: bold;
      transform: translateY(-30px);

      overflow: hidden;
      text-overflow: ellipsis;
      display: -webkit-box;
      -webkit-box-orient: vertical;
      -webkit-line-clamp: 3;
    }
  }
}
</style>